/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.close.basic.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hopes.bizz.close.basic.dto.ClosedGeneralCarAuditDTO;
import com.hopes.bizz.close.basic.dto.ClosedGeneralCarDTO;
import com.hopes.bizz.close.basic.dto.ClosedGeneralCarExcelDTO;
import com.hopes.bizz.close.basic.entity.ClosedGeneralCarEntity;
import com.hopes.bizz.close.basic.vo.ClosedGeneralCarExcelVO;
import com.hopes.bizz.close.basic.vo.ClosedGeneralCarVO;
import com.hopes.bizz.close.common.constant.CloseModuleEnums;
import com.hopes.boss.common.core.util.R;
import com.hopes.boss.common.service.ExcelService;
import org.springframework.validation.BindingResult;

import java.util.List;

/**
 * 普通车辆信息
 *
 * @author pig
 * @date 2023-10-23 17:28:41
 */
public interface ClosedGeneralCarService extends ExcelService<ClosedGeneralCarExcelDTO, ClosedGeneralCarExcelVO, ClosedGeneralCarEntity> {

    /**
     * 根据Id获取车辆Vo
     * @param id 标识
     * @return   结果
     */
    ClosedGeneralCarVO getVoById(Long id);


    /**
     * 提交普通车辆信息
     * @param id 标识
     * @return   结果
     */
    boolean submitById(Long id);


    /**
     * 新增并提交普通车辆信息
     * @param closedGeneralCar  普通车辆信息
     * @return   结果
     */
    boolean saveAndSubmit(ClosedGeneralCarEntity closedGeneralCar);

    /**
     * 审核普通车辆信息
     * @param closedGeneralCarAuditDTO  审核DTO
     * @return   结果
     */
    boolean auditById(ClosedGeneralCarAuditDTO closedGeneralCarAuditDTO);

    /**
     * 移动端分页查询我的车辆申请
     * @param page                 分页参数
     * @param closedGeneralCarDTO  查询参数
     * @return                     结果集
     */
    IPage<ClosedGeneralCarEntity> getAppGeneralCarSelfPage(Page page, ClosedGeneralCarDTO closedGeneralCarDTO);

    /**
     * 数据导出
     * @param list      集合
     * @param clazz     类
     * @return          结果
     */
    List<?> exportExcelWithClass(List<ClosedGeneralCarEntity> list, Class<? extends ClosedGeneralCarExcelVO> clazz);


    /**
     * 移动端分页查询 企业待审批、已审批的申请
     * @param page                      分页参数
     * @param auditStatusList           状态
     * @param closedGeneralCarDTO       参数
     * @return                          结果集
     */
    IPage<ClosedGeneralCarEntity> queryAppGeneralCarAuditPage(Page page, List<Integer> auditStatusList, ClosedGeneralCarDTO closedGeneralCarDTO);


}
